package com.klhappy.houyuan.utils.okhttp;

import com.google.gson.Gson;
import com.klhappy.houyuan.bean.BaseJsonBean;
import com.klhappy.houyuan.utils.okhttp.callback.Callback;
import com.squareup.okhttp.Response;

import java.io.IOException;

/**
 * Created by MrPu on 15/12/30.
 */
public abstract class BaseBeanCallback extends Callback<ImgBean> {

    @Override
    public ImgBean parseNetworkResponse(Response response) throws IOException
    {
        String string = response.body().string();
        ImgBean img = new Gson().fromJson(string, ImgBean.class);
        return img;
    }

}
